import {
	http
} from "../config.js";

// 获取用户基本信息
export const getUserInfo = (params) => {
	return http.post("front/user/get/userInfo", params,true,false);
}

//获取我的预售列表 	POST /front/user/get/myGoods
//商品状态 1正常 2审核中 3下架 4取消 5售罄
export const getMygoods = (params) => {
	return http.post("front/user/get/myGoods", params);
}

// 获取实名认证 POST /front/user/get/authInfo
export const getAuthInfo = (params) => {
	return http.post("front/user/get/authInfo", params);
}

// 实名认证 POST /front/user/userAuth
export const toAuthInfo = (params) => {
	return http.post("front/user/userAuth", params);
}

// 获取银行列表POST /front/user/get/bankList
export const getBankList = (params) => {
	return http.post("front/user/get/bankList", params);
}



//获取收款账户POST /front/user/get/payAccount
export const getPayAccount = (params) => {
	return http.post("front/user/get/payAccount", params);
}

// 提现申请	POST /front/user/withdrawal  type =1 银行卡   2支付宝
export const withDrawal = (params) => {
	return http.post("front/user/withdrawal", params);
}
// 获取提现记录	POST /front/user/get/withdrawalLog
export const withDrawalLog = (params) => {
	return http.post("front/user/get/withdrawalLog", params);
}


// 查询余额 POST /front/user/get/userWallet
export const getUserWallet = (params) => {
	return http.post("front/user/get/userWallet", params);
}
// 查询余额参数
export const getWalletSysConfig = (params) => {
	return http.post("front/user/getWalletSysConfig", params);
}
//资产明细  POST /front/user/get/userWalletLogList
// costType		1余额  2支付宝  3闲豆
// type			1 购买商品  	2 后台操作  3申请提现 4取消订单
export const getUserWalletLogList = (params) => {
	return http.post("front/user/get/userWalletLogList", params,true,false);
}


// 获取易购卡列表POST /front/card/getCardList
export const getCardList = (params) => {
	return http.post("front/card/getCardList", params);
}
// 获取卡的详情POST /front/card/getCardInfo
export const getCardInfo = (params) => {
	return http.post("front/card/getCardInfo", params);
}

// 获取优选店铺POST /goods/choiceList
export const getGoodsShop = (params) => {
	return http.post("goods/choiceList", params);
}
// 获取优选店铺的商品 POST /goods/getGoodsByMerchant

export const getGoodsByMerchant = (params) => {
	return http.post("goods/getGoodsByMerchant", params);
}
// 余额兑换
export const balanceTransferDiamond = (params) =>{
	return http.post('front/user/balanceTransferDiamond',params,true)
}
// 余额转账
export const balanceTransfer = (params) =>{
	return http.post('front/user/balanceTransfer',params,true)
}
// 优惠券
export const couponGetList = (params) =>{
	return http.post('coupon/getList',params,true)
}

// 优惠券明细
export const couponFinanceLog = (params) =>{
	return http.post('couponFinanceLog/getList',params,false)
}